package com.seawaterbt.springbootshiro.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.seawaterbt.springbootshiro.entity.Permission;
import com.seawaterbt.springbootshiro.entity.Role;
import com.seawaterbt.springbootshiro.entity.User;
import com.seawaterbt.springbootshiro.mapper.UserMapper;
import com.seawaterbt.springbootshiro.service.UserService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {

    @Override
    public List<Role> selectAllRole(User user) {
        return baseMapper.selectAllRole(user);
    }

    @Override
    public List<Permission> selectAllPermissionByRid(Role role) {
        return baseMapper.selectAllPermissionByRid(role);
    }

    @Override
    public List<Permission> selectAllPermissionByUid(User user) {
        return baseMapper.selectAllPermissionByUid(user);
    }

}
